Skip to content

Conversation

@Nifty255
Copy link

A developer may wish to decode or otherwise assign to a struct field but not re-encode. For example, a MongoDB document struct with a struct pointer inside for relationships:

type User struct {
  Email     string    `bson:"email"`
  Sessions  []Session `bson:"sessions,omitalways"`
}

This is accomplished via the following set of implementations:

  • Implement flag in fieldInfo struct.
  • Implement flag detection and assignment to fieldInfo struct.
  • Implement skip-encode on flag true.
  • Implement documentation and examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant